package com.ponhu.ea2.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @author luyu
 * @create 2021-10-21 10:11
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "系列-数据传输模型 ")
public class PhSeriesVO implements Serializable {

    @ApiModelProperty(value = "系列id")
    private Long id;

    @ApiModelProperty(value = "系列名称")
    private String name;

    @ApiModelProperty(value = "系列中文名称", hidden = true)
    private String anotherName;

    public String getName() {
        if (StringUtils.isNotEmpty(anotherName))
            return String.format("%s %s", name, anotherName);
        return name;
    }

}
